home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Toolbox / Notification Hacks / NotificationMon.ƒ / Headers / NotificationMon.h < prev   
Encoding:
C/C++ Source or Header  |  1992-09-04  |  950 b   |  48 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. typedef struct {
  4.     Boolean    hideWindowInBackground;
  5.     Boolean    notifyNewMessage;
  6.     short    backTime;
  7.     short    foreTime;
  8.     Rect    windowLoc;
  9. } prefRec;
  10.  
  11.  
  12. typedef struct neoNotification {
  13.     Handle                 icon;
  14.     Handle                 sound;
  15.     Handle                 message;
  16.     long                psn[2];
  17.     struct neoNotification **next;
  18. } neoNotification, **nnH;
  19.  
  20.  
  21. typedef struct {
  22.     WindowRecord    nWin;
  23.     short            ncount;
  24.     nnH                nHead;
  25.     nnH                nTail;
  26.     short            nSelection;
  27.     short            lineHt;
  28.     short            longestLine;
  29.     ControlHandle    vScroll;
  30.     prefRec            prefs;
  31. }    notificationDoc;
  32.  
  33.  
  34. #define notifyKind 16
  35. extern notificationDoc    *MainView;
  36.  
  37. notificationDoc *NewNotificationDoc(short wID);
  38. nnH    GetNotificationEntryByNumber(notificationDoc *nmd, short num);
  39. void UpdateNotifications(notificationDoc *nmd, short first);
  40. Boolean IsNotificationDoc(WindowPeek wp);
  41.  
  42.  
  43.  
  44. #define RECT_WIDTH(r) (r.right - r.left)
  45. #define RECT_HEIGHT(r) (r.bottom - r.top)
  46. #define RIGHT_MARGIN 16 + 8
  47. #define WINDOW(n) n->nWin.port
  48.